#pragma once
#include "mytypes.h"
#include "dynamics.h"
#include "RigidBody.h"

namespace poly
{
	// A Joint constraint
	// Keeps two bodies connected at one point, free to rotate
	class Joint : public IConstraint
	{
	public:
		Joint();

		void apply(float dt);
		RigidBody * rigidBody1;
		RigidBody * rigidBody2;
		float3 pointOfApp1; // in local coordinates
		float3 pointOfApp2; // in local coordinates
	};
}
